package com.boge.ai.controller;

import org.springframework.ai.chat.client.ChatClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ChatClientController {

    @Autowired
    private ChatClient chatClient;

    /*public ChatClientController(ChatClient.Builder builder) {
        chatClient = builder.build();
    }*/

    @GetMapping("/helloSpringAI")
    public String helloSpringAI(){
        String content = chatClient.prompt("请你介绍下你自己").call().content();
        return content;
    }
}
